tools/elfutils: replace dependency hack with upstream include path fix
authorMichael Pratt <[email protected]>
Sun, 20 Oct 2024 11:49:50 +0000 (07:49 -0400)
committerRobert Marko <[email protected]>
Sat, 26 Jul 2025 12:38:08 +0000 (14:38 +0200)
commit8f920d2f94b0878e9b4291ffa18cfc9e02828f77
tree4bb195bdb3c0ec34a5f26077165c050659f7f71c
parent30105c77efc09ec5edbaba4741f4f8f265f1f2aa
tools/elfutils: replace dependency hack with upstream include path fix

In order to solve the problem of the possibility that
the "stack" binary is incorrectly included as a header
while the compiler looks for the standard C++ header "stack",
a workaround forcing a dependency between building "stack"
and the C++ program was introduced.

This upstream fix uses the compiler "-iquote" option
in order to avoid looking for standard headers
in the current working directory
and blocks the default inclusion of "-I ."
to the compiler flags.

The upstream fix happens to be incomplete,
so add an extra patch to fix an additional instance
and then remove the workaround.

Also, adjust the way DEFAULT_INCLUDES is overridden
in the build Makefile by using the "-iquote" option
in the same manner in order to remove all instances
of the default inclusion for the current directory.

Tested-by: Georgi Valkov <[email protected]> # macOS
Signed-off-by: Michael Pratt <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/16522
Signed-off-by: Robert Marko <[email protected]>
tools/elfutils/Makefile
tools/elfutils/patches/000-backport-iquote-include.patch [new file with mode: 0644]
tools/elfutils/patches/001-fix-backport-iquote-include.patch [new file with mode: 0644]
tools/elfutils/patches/100-portability.patch